﻿// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// This file is part of CodingEditor.
// Note:	This project is derived from Peter Project
//			(hosted on sourceforge and codeplex)
//
// Copyright (c) 2008-2009, CE Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


namespace CE.Plugin.FileExplorer
{
    using System;
    using System.Drawing;
    using System.Windows.Forms;
    using CE.API;
    using WeifenLuo.WinFormsUI.Docking;
    using Microsoft.WindowsAPICodePack.Shell;
    using Microsoft.WindowsAPICodePack.Controls;

    public partial class FrmFileExplorer : DockContent, ICEPluginTab
    {
        #region Fields

        private ICEPluginHost host;

        #endregion Fields

        #region Constructors

        public FrmFileExplorer()
        {
            InitializeComponent();
            explorerBrowser1.Navigate((ShellObject)KnownFolders.Desktop);
        }

        #endregion Constructors

        #region Properties

        public bool AbleToCopy
        {
            get { return false; }
        }

        public bool AbleToCut
        {
            get { return false; }
        }

        public bool AbleToDelete
        {
            get { return false; }
        }

        public bool AbleToPaste
        {
            get { return false; }
        }

        public bool AbleToRedo
        {
            get { return false; }
        }

        public bool AbleToSave
        {
            get { return false; }
        }

        public bool AbleToSelectAll
        {
            get { return false; }
        }

        public bool AbleToUndo
        {
            get { return false; }
        }

        public string FileName
        {
            get { return string.Empty; }
        }

        public ICEPluginHost Host
        {
            get { return host; }
            set
            {
                host = value;
                //this.browser1.CodingEditorPluginHost = host;
            }
        }

        public bool NeedsSaving
        {
            get { return false; }
        }

        public string Selection
        {
            get { throw new NotImplementedException(); }
        }

        #endregion Properties

        #region Methods

        public bool CloseTab()
        {
			Icon.Dispose();
            this.Close();
            return false;
        }

        public void Copy()
        {
            throw new NotImplementedException();
        }

        public void Cut()
        {
            throw new NotImplementedException();
        }

        public void Delete()
        {
            throw new NotImplementedException();
        }

        public void Duplicate()
        {
            throw new NotImplementedException();
        }

        public bool FindNext(System.Text.RegularExpressions.Regex reg, bool searchUp)
        {
            throw new NotImplementedException();
        }

        public void MarkAll(System.Text.RegularExpressions.Regex reg)
        {
            throw new NotImplementedException();
        }

        public void Paste()
        {
            throw new NotImplementedException();
        }

        public void Print(bool showDialog)
        {
            throw new NotImplementedException();
        }

        public void Redo()
        {
            throw new NotImplementedException();
        }

        public void ReplaceAll(System.Text.RegularExpressions.Regex reg, string replaceWith)
        {
            throw new NotImplementedException();
        }

        public void ReplaceNext(System.Text.RegularExpressions.Regex reg, string replaceWith, bool searchUp)
        {
            throw new NotImplementedException();
        }

        public void Save()
        {
            throw new NotImplementedException();
        }

        public void SaveAs(string filePath)
        {
            throw new NotImplementedException();
        }

        public void SelectAll()
        {
            throw new NotImplementedException();
        }

        public void SelectWord(int line, int offset, int wordLeng)
        {
            throw new NotImplementedException();
        }

        public void Undo()
        {
            throw new NotImplementedException();
        }

        private void FileExplorerGUI_FormClosed(object sender, FormClosedEventArgs e)
        {
            Dispose(true);
        }

        #endregion Methods
    }
}